use explicit_bzero() to zero memory
authorDebian Samba Maintainers <pkg-samba-maint@lists.alioth.debian.org>
Sun, 8 Mar 2026 11:27:42 +0000 (14:27 +0300)
committerMichael Tokarev <mjt@tls.msk.ru>
Sun, 8 Mar 2026 11:27:42 +0000 (14:27 +0300)
commitdbf55a1b3808edd6bee59a8d46f7b74b38a7a110
tree33a7658bd3bcd14293929a228d272771c564bc76
parent823c160a220d5f05231f9505b26ad4844d701f93
use explicit_bzero() to zero memory

Samba uses memset_s() to zero-fill unused sensitive memory
areas.  This interface is difficult to use right, and is not
implemented in glibc due to this.  So many parts of samba
link to libreplace to get rep_memset_s().  But glibc provides
explicit_bzero(), so there's no need for this linkage.

Unfortunately there are just insane amount of similar
but non-standard functions, and upstream don't want
to stay on something simple and robust in this context.

Gbp-Pq: Name use-explicit_bzero-to-zero-memory.diff
lib/replace/replace.h